<?php
namespace app\base\model;

use think\Model;
use think\Session;

class SubjectModel extends Model
{
    protected $table = 'iSubject';
    protected $pk = 'Id';
    protected $autoWriteTimestamp = 'datetime';
    protected $createTime = 'CreateTime';
    protected $updateTime = 'UpdateTime';

    protected $auto = [];
    protected $insert = ['CreateId','UpdateId'];
    protected $update = ['UpdateId'];

    protected function setCreateIdAttr()
    {
        $info = Session::get();
        $adminId = $info['cms_user']['uid'];
        return $adminId;
    }

    protected function setUpdateIdAttr()
    {
        $info = Session::get();
        $adminId = $info['cms_user']['uid'];
        return $adminId;
    }
}